package com.diandi.signature.enums.platfrom;

/**
 * Created by mxp on 2017/9/5.
 */
public enum ContractTypeAndTempName {
    借款协议("1", "loanAgreement.ftl", "loanAgreement"),
    信息咨询与管理服务协议("2", "inforServiceAgreement.ftl", "inforServiceAgreement"),
    借款人承诺书("3", "letterOfCommitment.ftl", "letterOfCommitment"),
    债券转让协议("4", "bondTransferAgreement.ftl", "bondTransferAgreement"),
    授权委托协议("5", "delegationAgreement.ftl", "delegationAgreement"),
    委托代扣协议_循环贷("6", "entrustWithHoldAgreement.ftl", "entrustWithHoldAgreement"),
    信息咨询与管理服务协议_包年服务("7", "packYear.ftl", "packYear"),
    借款协议并委托代扣协议("8", "loanAndEntrustWithHoldAgreement.ftl", "loanAndEntrustWithHoldAgreement"),
    委托划款授权书_投资人("9","letterOfAuthorization.ftl","letterOfAuthorization"),
    借款协议_High购房("10", "loanAgreement_house.ftl","loanAgreement_house"),
    信息咨询与管理服务协议_线上("11", "inforServiceAgreement_onLine.ftl","inforServiceAgreement_onLine"),
    借款协议_有用分期("12", "loanAgreement_byStages.ftl","loanAgreement_byStages"),
    借款协议_High酒店("13","loanAgreement_hotel.ftl","loanAgreement_hotel"),
    借款协议_High游艇("14","loanAgreement_yacht.ftl","loanAgreement_yacht"),
    借款协议_秒借("15","loanAgreement_miaojie.ftl","loanAgreement_miaojie"),
    借款协议_苹果专享宝("16","loanAgreement_apple.ftl","loanAgreement_apple"),
    借款协议_车贷宝("17","carLoanServiceAgreement.ftl","carLoanServiceAgreement"),
    借款协议_企业机构("18","loanAgreement_enterprise.ftl","loanAgreement_enterprise"),
    定期宝服务协议("19","regularTreasureServiceAgreement.ftl","regularTreasureServiceAgreement"),
    活期宝服务协议("20","currentTreasureServiceAgreement.ftl","currentTreasureServiceAgreement"),
    委托代偿协议("21","entrustedCompensation.ftl","entrustedCompensation"), //新增代偿协议，作废
    电子签章使用授权书("22","qZUseAuthorization.ftl","qZUseAuthorization"),
    资金出借风险提示书("23","riskNote.ftl","riskNote"),
    车信宝借款协议("24","cheXinBaoServiceAgreement.ftl","cheXinBaoServiceAgreement"),
    定期宝借款协议("25","regularLoanServiceAgreement.ftl","regularLoanServiceAgreement"),
    活期宝("26","huoQiBaoloanAgreement.ftl","huoQiBaoloanAgreement"),
    包年服务借款业务规则("27", "loanBusinessRules.ftl", "loanBusinessRules"),
    代偿协议("28", "compensationAgreement.ftl", "compensationAgreement"),
    ;

    private String type;

    private String tempName;

    private String jspName;

    ContractTypeAndTempName(String type, String tempName, String jspName) {
        this.type = type;
        this.tempName = tempName;
        this.jspName = jspName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTempName() {
        return tempName;
    }

    public void setTempName(String tempName) {
        this.tempName = tempName;
    }

    public String getJspName() {
        return jspName;
    }

    public void setJspName(String jspName) {
        this.jspName = jspName;
    }

    public static ContractTypeAndTempName getEnum(String type){
        ContractTypeAndTempName[] contracts = ContractTypeAndTempName.values();
        for (ContractTypeAndTempName contractTypeAndTempName : contracts) {
            if (contractTypeAndTempName.getType().equals(type)){
                return contractTypeAndTempName;
            }
        }
        return null;
    }
}